import org.softmed.rest.generation.xml.PagedList;
import org.restlet.resource.*;
import org.restlet.data.*;
import org.restlet.data.MediaType;
import org.restlet.data.Status;
import org.softmed.rest.generation.xml.manager.GenericToXML;


String xml = null;

GenericToXML conv = new GenericToXML(xmlSuite);
if(queryParameters.getFirst("detailed")==null)
xml = conv.toXML(pagedList, util,application);
else
xml = conv.toXML(pagedList, util,application,"detailed");
	
response.setEntity(xml, MediaType.APPLICATION_XML);